package yr.website

class Roles {
    /*
    角色id
     */
    String roleId
    /*
    角色名字
     */
    String name
    /*
    角色描述
     */
    String description
    /*
    菜单id
     */
    String perId
    /*
    创建时间
     */
    Date createDate
    /*
    创建人
     */
    String creator

    /**
     * 映射。
     */
    static mapping = {
        table "roles"
        version false
        roleId(column: "roleId", sqlType: "varchar(10)")
        name(column: "name", sqlType: "varchar(50)")
        description(column: "description", sqlType: "varchar(100)")
        perId(column: "perId", sqlType: "varchar(200)")
        createDate(column: "createDate", sqlType: "datetime")
        creator(column: "creator", sqlType: "varchar(20)")
    }

    static constraints = {
        roleId(nullable: false, unique: true)
        name(nullable: false, unique: true)
        description(nullable: true, unique: false)
        perId(nullable: false, unique: false)
        createDate(nullable: true, unique: false)
        creator(nullable: true, unique: false)
    }
}
